parent = window->parent;
- if (parent == NULL)
+ if (gdk_window_is_toplevel (window))
return;
/* Convert from from window coords to parent coords */
cairo_region_destroy (child_region);
}
+ remove_sibling_overlapped_area (parent, region);
+
/* Convert back to window coords */
cairo_region_translate (region, -window->x, -window->y);
}
}
}
- if (clip_region_changed &&
- should_apply_clip_as_shape (private))
- apply_clip_as_shape (private);
-
if (private->cairo_surface && gdk_window_has_impl (private))
{
GdkWindowImplClass *iface = GDK_WINDOW_IMPL_GET_CLASS (private->impl);
recompute_visible_regions (GdkWindow *private,
gboolean recalculate_children)
{
+ GdkWindow *toplevel;
+
+ toplevel = gdk_window_get_toplevel (private);
+ toplevel->geometry_dirty = TRUE;
+
recompute_visible_regions_internal (private,
TRUE,
recalculate_children);
{
GdkWindow *old_parent;
GdkScreen *screen;
- gboolean show, was_mapped, applied_clip_as_shape;
+ gboolean show, was_mapped;
gboolean do_reparent_to_impl;
GdkEventMask old_native_event_mask;
GdkWindowImplClass *impl_class;
new_parent->window_type == GDK_WINDOW_FOREIGN)
gdk_window_ensure_native (window);
- applied_clip_as_shape = should_apply_clip_as_shape (window);
-
old_native_event_mask = 0;
do_reparent_to_impl = FALSE;
if (gdk_window_has_impl (window))
recompute_visible_regions (window, FALSE);
- /* We used to apply the clip as the shape, but no more.
- Reset this to the real shape */
- if (gdk_window_has_impl (window) &&
- applied_clip_as_shape &&
- !should_apply_clip_as_shape (window))
- apply_shape (window, window->shape);
-
if (do_reparent_to_impl)
reparent_to_impl (window);
else
recompute_visible_regions (window, FALSE);
- /* The shape may not have been set, as the clip region doesn't actually
- change, so do it here manually */
- if (should_apply_clip_as_shape (window))
- apply_clip_as_shape (window);
-
reparent_to_impl (window);
if (!window->input_only)
g_list_free_full (children, g_object_unref);
}
+static void
+gdk_window_update_native_shapes (GdkWindow *window)
+{
+ GdkWindow *child;
+ GList *l;
+
+ if (should_apply_clip_as_shape (window))
+ apply_clip_as_shape (window);
+
+ for (l = window->native_children; l != NULL; l = l->next)
+ {
+ child = l->data;
+
+ gdk_window_update_native_shapes (child);
+ }
+}
+
/* Process and remove any invalid area on the native window by creating
* expose events for the window and all non-native descendants.
*/
GdkWindowImplClass *impl_class;
gboolean save_region = FALSE;
GdkRectangle clip_box;
+ GdkWindow *toplevel;
+
+ toplevel = gdk_window_get_toplevel (window);
+ if (toplevel->geometry_dirty)
+ {
+ gdk_window_update_native_shapes (toplevel);
+ toplevel->geometry_dirty = FALSE;
+ }
/* Ensure the window lives while updating it */
g_object_ref (window);
recompute_visible_regions (window, FALSE);
- if (gdk_window_has_impl (window) &&
- !should_apply_clip_as_shape (window))
- apply_shape (window, window->shape);
-
if (old_region)
{
new_region = cairo_region_copy (window->clip_region);